//
//  MVIPCardModel.m
//  NeusoftHBSJSober
//
//  Created by Apple-21 on 15/11/7.
//  Copyright (c) 2015年 com.neusoftsober. All rights reserved.
//

#import "MVIPCardModel.h"

@implementation MVIPCardModel



@end

@implementation MVIPCardHTTPResult

- (id)getVIPCardResultListWithJSON:(id)JSON {

    
    if ([JSON isKindOfClass:[NSArray class]] && JSON) {
        
        NSMutableArray *result = [NSMutableArray array];
        NSArray *data = (NSArray *)JSON;
        for (NSDictionary *dict in data) {
            
            MVIPCardModel *model = [[MVIPCardModel alloc]init];
            
            model.userId = [(NSNumber *)dict[@"UserID"] stringValue];
            
            model.outMoney = [(NSNumber *)dict[@"OutMoney"] stringValue];
            
            NSString *dataString = [dict[@"CreateTime"] stringByReplacingOccurrencesOfString:@"T" withString:@""];
            NSString *dataString1 = [dataString substringToIndex:18];
            model.createTime = dataString1;
            
            
            model.balance = [(NSNumber *)dict[@"Balance"] stringValue];

            model.operate = (dict[@"Operate"] == [NSNull null]) ? @"" : dict[@"Operate"];
            
            model.notes = (dict[@"Notes"] == [NSNull null]) ? @"" : dict[@"Notes"];
            
            model.ID = [(NSNumber *)dict[@"ID"] stringValue];
            
            model.inMoney = [(NSNumber *)dict[@"InMoney"] stringValue];
            
            [result addObject:model];
        }
        return result;
    }
    
    return nil;
    
}

@end